package com.itheima.service.impl;

import com.itheima.mapper.SetMealMapper;
import com.itheima.pojo.Setmeal;
import com.itheima.service.SetMealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SetMealServiceImpl implements SetMealService {
    @Autowired
    private SetMealMapper setMealMapper;

    /**
     * 获取所有套餐信息
     */
    @Override
    public List<Setmeal> getSetmeal() {
        return setMealMapper.getSetmeal();
    }
    /**
     * 根据套餐id查询套餐详情，包含（套餐基本信息、套餐关联的检查组、检查组关联的检查项）
     */
    @Override
    public Setmeal findById(Integer id) {
        Setmeal setmeal = setMealMapper.findById(id);
        return setmeal;
    }
}
